package top.hcode.hoj.pojo.entity.coll;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import top.hcode.hoj.pojo.entity.org.OrgUser;

/**
 * 原创作品
 * (coll_created_works)表实体类
 *
 * @author orangej
 * @since 2025-01-21
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("coll_created_works")
public class CollCreatedWorks implements Serializable {

    private static final long serialVersionUID = 9988647310L;

    @TableId(value = "id", type = IdType.ID_WORKER_STR)
    private String id;

    private String collId;

    private String userId;

    private String userName;

    private String title;

    private String intro;

    @ApiModelProperty(value = "附件文件id，多个文件以逗号分隔")
    private String appendFiles;

    // 评分
    private BigDecimal score;

    // 评分人数
    private Integer scoreNum;

    @TableField(fill = FieldFill.INSERT)
    private Date gmtCreate;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date gmtModified;

    /*关联属性*/
    @TableField(exist = false)
    private OrgUser user;

}
